import string

password = input("请输入密码：")

num = 0
lletter = 0
hletter = 0
symbol = 0

if len(password) < 8:
    print("密码强度弱")
else:
    for ch in password:
        # 数字判断
        if ch in string.digits:
            num = 1
        # 小写判断
        elif ch in string.ascii_lowercase:
            lletter = 1
        # 大写判断
        elif ch in string.ascii_uppercase:
            hletter = 1
        # 特殊字符判断
        elif ch in string.punctuation:
            symbol = 1
    if num + lletter + hletter + symbol == 2:
        print("密码强度中")
    elif num + lletter + hletter + symbol == 3:
        print("密码强度强")
    elif num + lletter + hletter + symbol == 4:
        print("密码强度极强")
    else:
        # print(str(num) + str(lletter) + str(hletter) + str(symbol))
        print('弱密码(最好包含数字或字符)')
